package com.itheima.controller;
import com.itheima.constant.MessageConstant;
import com.itheima.entity.Announcement;
import com.itheima.service.IndexVisualizationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.itheima.utils.Result;
/**
 * 主页台账Controller
 *
 * @author guanhuaer
 * @date 2025-03-20
 */
@RestController
@RequestMapping("/index")
public class IndexVisualizationController {
    @Autowired
    private IndexVisualizationService visualizationService;


    @GetMapping("/baseInfo")
    @ApiOperation("主页台账baseInfo")
    public Result cementTitle() {
        return Result.success(visualizationService.getBaseInfo());
    }

    @GetMapping("/projectLineData")
    @ApiOperation("主页台账projectLineData")
    public Result projectLineData(String type) {
        return Result.success(visualizationService.getProjectLineData(type));
    }

    @GetMapping("/baseUserInfo")
    @ApiOperation("主页台账baseUserInfo")
    public Result baseUserInfo(Integer userId) {
        return Result.success(visualizationService.getBaseUserInfo(userId));
    }
    @GetMapping("/baseTeacherInfo")
    @ApiOperation("主页台账teacherBaseInfo")
    public Result getTeacherBaseInfo(Integer userId) {
        return Result.success(visualizationService.getTeacherBaseInfo(userId));
    }
}
